home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / gnu / djgpp / contrib / dvx / inc / x11 / extensio / xshm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-15  |  2.3 KB  |  68 lines

  1. /************************************************************
  2. Copyright 1989 by The Massachusetts Institute of Technology
  3.  
  4. Permission to use, copy, modify, and distribute this
  5. software and its documentation for any purpose and without
  6. fee is hereby granted, provided that the above copyright
  7. no- tice appear in all copies and that both that copyright
  8. no- tice and this permission notice appear in supporting
  9. docu- mentation, and that the name of MIT not be used in
  10. advertising or publicity pertaining to distribution of the
  11. software without specific prior written permission.
  12. M.I.T. makes no representation about the suitability of
  13. this software for any purpose. It is provided "as is"
  14. without any express or implied warranty.
  15.  
  16. ********************************************************/
  17.  
  18. /* EXPERIMENTAL! THIS HAS NO OFFICIAL X CONSORTIUM BLESSING */
  19.  
  20. /* $XConsortium: XShm.h,v 1.4 89/08/31 12:58:22 rws Exp $ */
  21.  
  22. #ifndef _XSHM_H_
  23. #define _XSHM_H_
  24.  
  25. #define X_ShmQueryVersion        0
  26. #define X_ShmAttach            1
  27. #define X_ShmDetach            2
  28. #define X_ShmPutImage            3
  29. #define X_ShmGetImage            4
  30. #define X_ShmCreatePixmap        5
  31.  
  32. #define ShmCompletion            0
  33. #define ShmNumberEvents            (ShmCompletion + 1)
  34.  
  35. #define BadShmSeg            0
  36. #define ShmNumberErrors            (BadShmSeg + 1)
  37.  
  38. typedef unsigned long ShmSeg;
  39.  
  40. #ifndef _XSHM_SERVER_
  41. typedef struct _XShmCompletionEvent { /* POHC 92/02/14 */
  42.     int    type;            /* of event */
  43.     unsigned long serial;   /* # of last request processed by server */
  44.     Bool send_event;        /* true if this came frome a SendEvent request */
  45.     Display *display;        /* Display the event was read from */
  46.     Drawable drawable;        /* drawable of request */
  47.     int major_code;        /* ShmReqCode */
  48.     int minor_code;        /* X_ShmPutImage */
  49.     ShmSeg shmseg;        /* the ShmSeg used in the request */
  50.     unsigned long offset;   /* the offset into ShmSeg used in the request */
  51. } XShmCompletionEvent;
  52.  
  53. typedef struct _XShmSegmentInfo { /* POHC 92/02/14 */
  54.     ShmSeg shmseg;    /* resource id */
  55.     int shmid;        /* kernel id */
  56.     char *shmaddr;    /* address in client */
  57.     Bool readOnly;    /* how the server should attach it */
  58. } XShmSegmentInfo;
  59.  
  60. Bool XShmQueryVersion();
  61. Status XShmAttach(), XShmDetach(), XShmPutImage(), XShmGetImage();
  62. XImage *XShmCreateImage();
  63. Pixmap XShmCreatePixmap();
  64.  
  65. #endif
  66.  
  67. #endif
  68.